<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="root">
    <p>{{title}}</p>
    <!-- 完整模式 -->
    <button v-on:click="clickEvent($event)">vue的事件监听</button>
    <!-- 简写模式 -->
    <button @click="clickEvent($event)">vue的事件监听</button>
</div>

<script>
    Vue.config.productionTip = false;
    const vm = new Vue({
        el: '#root',
        data: {
            title: 'Vue2',
        },
        methods: {
          clickEvent(e) {
            console.log('vue的事件监听', e, event);
          },
        },
      });

      console.log(vm);
    </script>
</body>
</html>